import configparser

conf = configparser.ConfigParser()
conf.read('db.conf', encoding='utf-8')
host=conf.get('regress','host')
db=conf.get('regress','db')
user=conf.get('regress','user')
passwd=conf.get('regress','password')
dbinfo={'host':host,'db':db,'user':user,'password':passwd}
print(dbinfo)
